package study;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

public class ListPrint {
    public static void main(String[] args){
        int[] array = new int[3];
        System.out.println(Arrays.toString(array));
        System.out.println(Arrays.toString(args));
        int array1 [] = new int[3];
        int[] array2 = {1, 2, 3};
        int[] array3 = new int[]{1, 2, 3};
        List<java.io.Serializable> list = new ArrayList<java.io.Serializable>(10);
        list.add(1);
        list.add("1");
        list.add(new Double("1.1"));
        list.add("第四个元素,已经超过初始长度");
        list.add(1,"333");
        for (Object o : list) {
            System.out.println(o);
        }
        List a = new ArrayList();
        a.add("1");
        a.add(1);
        a.add(new Date());
        for(Object m:a){
            System.out.println(m);
        }
    }
}
